import { ORDERS } from '../consts';
import { ADMINS } from '../consts'
import axios from '../axios';

export default {
    //管理员获取订单
    async getAllOrders(params) {
        return await axios({
            url: ORDERS + '/getOrders',
            method: 'get',
            params,
        })
    },
    async getAllAdmins(params){
        return await axios({
            url:ADMINS + '/getAdmins',
            method:'get',
            params
        })
    },
    async addAdmins(data) {
        return await axios({
            url: ADMINS + '/addAdmins',
            method: 'post',
            data
        })
    },
    async modifyAdmins(data) {
        return await axios({
            url: ADMINS + '/changeAdmins',
            method: 'post',
            data
        })
    },
    async delAdmins(data) {
        // console.log(data, 76);
        return await axios({
            url: ADMINS + '/delAdmins',
            method: 'post',
            data
        })
    },
    //changeState
    async changeState(data) {
        console.log(data, 76);
        return await axios({
            url: ADMINS + '/changeState',
            method: 'post',
            data
        })
    }
    // async getOneAdmin(data){
    //     return await axios({
    //         url:ADMINS +'/changeAdmins',
    //         method:'post',
    //         data,
    //     })
    // }
}


